package site;

import java.io.Serializable;
import java.util.Collection;
import java.util.Vector;
import javax.persistence.*;

@Entity
@NamedQueries({
	@NamedQuery(name="ecole",query="select e from EcoleIng e where e.nomEcole = :ecole ")
})
public class EcoleIng implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id 
	@Column(name="nomEcole")
	private String nomEcole ;
	
	@OneToMany(targetEntity=Membre.class, cascade = {CascadeType.ALL}, mappedBy ="ecole")
	private Collection<Membre> membresInscrits=new Vector<Membre>();
	
	public EcoleIng() {
		
	}

	public Collection<Membre> getMembresInscrits() {
		return membresInscrits;
	}

	public void setMembresInscrits(Collection<Membre> membresInscrits) {
		this.membresInscrits = membresInscrits;
	}

	public String getNomEcole() {
		return nomEcole;
	}

	public void setNomEcole(String nomEcole) {
		this.nomEcole = nomEcole;
	}
}
